<?php
/**
 * Created by PhpStorm.
 * User: 小灰灰
 * Date: 2024-02-22
 * Time: 17:23:54
 * Info:
 */

namespace plugin\admin\app\middleware;

use Webman\MiddlewareInterface;
use Webman\Http\Response;
use Webman\Http\Request;

class Lang implements MiddlewareInterface
{

    public function process(Request $request, callable $handler): Response
    {
        locale(session('lang', 'zh_CN'));

        return $handler($request);
    }

}
